PV-to-HVM: Impletement compatibility version of
authorIan Campbell <ian.campbell@xensource.com>
Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)
committerIan Campbell <ian.campbell@xensource.com>
Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)
schedule_timeout_interruptible for kernels before 2.6.14

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
unmodified_drivers/linux-2.6/platform-pci/platform-compat.c

index 1026f9765375ca644148f6fd4e8477a5ce73c61e..6c08dad47d45a5b3500756675ea0b28ef2e03825 100644 (file)
@@ -37,4 +37,8 @@ unsigned long vmalloc_to_pfn(void *addr);
 unsigned long wait_for_completion_timeout(struct completion *x, unsigned long timeout);
 #endif
 
+#if defined(_LINUX_SCHED_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
+signed long schedule_timeout_interruptible(signed long timeout);
+#endif
+
 #endif
index 2df38d806bd0d11a76466ac8f4c987b02a58344f..f7c8db7fcd3b9051173ab751a2029cfb0dd62e14 100644 (file)
@@ -88,3 +88,12 @@ fastcall NORET_TYPE void do_exit(long code)
 }
 EXPORT_SYMBOL_GPL(do_exit);
 #endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
+signed long schedule_timeout_interruptible(signed long timeout)
+{
+       __set_current_state(TASK_INTERRUPTIBLE);
+       return schedule_timeout(timeout);
+}
+EXPORT_SYMBOL(schedule_timeout_interruptible);
+#endif